<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件处理</title>
</head>
<body>
    <button onclick="click_event()">这是一个点击事件按钮</button>
    <input type="text" onfocus="focus_event()" onblur="blur_event()">
    <script>
        //点击事件
        function click_event(){
            alert('点击事件触发');
        }

        function focus_event(){
            console.log('获取焦点');
            
        }
        function blur_event(){
            console.log('失去焦点');

        }
    </script>
</body>
</html>